package com.ruoyi.flink.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.flink.mapper.IpStatusMapper;
import com.ruoyi.flink.domain.IpStatus;
import com.ruoyi.flink.service.IIpStatusService;

/**
 * web服务运行ipService业务层处理
 * 
 * @author shu_k
 * @date 2021-04-23
 */
@Service
public class IpStatusServiceImpl implements IIpStatusService 
{
    @Autowired
    private IpStatusMapper ipStatusMapper;

    /**
     * 查询web服务运行ip
     * 
     * @param id web服务运行ipID
     * @return web服务运行ip
     */
    @Override
    public IpStatus selectIpStatusById(Long id)
    {
        return ipStatusMapper.selectIpStatusById(id);
    }

    /**
     * 查询web服务运行ip列表
     * 
     * @param ipStatus web服务运行ip
     * @return web服务运行ip
     */
    @Override
    public List<IpStatus> selectIpStatusList(IpStatus ipStatus)
    {
        return ipStatusMapper.selectIpStatusList(ipStatus);
    }

    /**
     * 新增web服务运行ip
     * 
     * @param ipStatus web服务运行ip
     * @return 结果
     */
    @Override
    public int insertIpStatus(IpStatus ipStatus)
    {
        ipStatus.setCreateTime(DateUtils.getNowDate());
        return ipStatusMapper.insertIpStatus(ipStatus);
    }

    /**
     * 修改web服务运行ip
     * 
     * @param ipStatus web服务运行ip
     * @return 结果
     */
    @Override
    public int updateIpStatus(IpStatus ipStatus)
    {
        ipStatus.setUpdateTime(DateUtils.getNowDate());
        return ipStatusMapper.updateIpStatus(ipStatus);
    }

    /**
     * 批量删除web服务运行ip
     * 
     * @param ids 需要删除的web服务运行ipID
     * @return 结果
     */
    @Override
    public int deleteIpStatusByIds(Long[] ids)
    {
        return ipStatusMapper.deleteIpStatusByIds(ids);
    }

    /**
     * 删除web服务运行ip信息
     * 
     * @param id web服务运行ipID
     * @return 结果
     */
    @Override
    public int deleteIpStatusById(Long id)
    {
        return ipStatusMapper.deleteIpStatusById(id);
    }
}
